        <div class="body-wrap">
        <div class="top-tools">
            <a class="inner-link" href="#Ext.util.Format-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
            <a class="inner-link" href="#Ext.util.Format-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
            <a class="inner-link" href="#Ext.util.Format-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
                        <a class="bookmark" href="../docs/?class=Ext.util.Format"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
        </div>
                <h1>Class Ext.util.Format</h1>
        <table cellspacing="0">
            <tr><td class="label">Package:</td><td class="hd-info">Ext.util</td></tr>
            <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../source/util/Format.js" target="_blank">Format.js</a></td></tr>
            <tr><td class="label">Class:</td><td class="hd-info">Format</td></tr>
                                    <tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr>
                    </table>
        <div class="description">
            Reusable data formatting functions<br><br><i>This class is a singleton and cannot be created directly.</i>        </div>
        
        <div class="hr"></div>
                <a id="Ext.util.Format-props"></a>
        <h2>Public Properties</h2>
        <div class="no-members">This class has no public properties.</div>        <a id="Ext.util.Format-methods"></a>
        <h2>Public Methods</h2>
                <table cellspacing="0" class="member-table">
            <tr>
                <th class="sig-header" colspan="2">Method</th>
                <th class="msource-header">Defined By</th>
            </tr>
                <tr class="method-row expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.util.Format-capitalize"></a>
            <b>capitalize</b>(&nbsp;<code>String value</code>&nbsp;) : String            <div class="mdesc">
                        <div class="short">Converts the first character only of a string to upper case</div>
            <div class="long">
                Converts the first character only of a string to upper case    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>value</code> : String<div class="sub-desc">The text to convert</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>String</code><div class="sub-desc">The converted text</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">Format</td>
    </tr>
        <tr class="method-row alt expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.util.Format-date"></a>
            <b>date</b>(&nbsp;<code>Mixed value</code>, <span class="optional" title="Optional">[<code>String format</code>]</span>&nbsp;) : String            <div class="mdesc">
                        <div class="short">Parse a value into a formatted date using the specified format pattern.</div>
            <div class="long">
                Parse a value into a formatted date using the specified format pattern.    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>value</code> : Mixed<div class="sub-desc">The value to format</div></li><li><code>format</code> : String<div class="sub-desc">(optional) Any valid date format string (defaults to 'm/d/Y')</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>String</code><div class="sub-desc">The formatted date string</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">Format</td>
    </tr>
        <tr class="method-row expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.util.Format-dateRenderer"></a>
            <b>dateRenderer</b>(&nbsp;<code>String format</code>&nbsp;) : Function            <div class="mdesc">
                        <div class="short">Returns a date rendering function that can be reused to apply a date format multiple times efficiently</div>
            <div class="long">
                Returns a date rendering function that can be reused to apply a date format multiple times efficiently    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>format</code> : String<div class="sub-desc">Any valid date format string</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>Function</code><div class="sub-desc">The date formatting function</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">Format</td>
    </tr>
        <tr class="method-row alt expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.util.Format-defaultValue"></a>
            <b>defaultValue</b>(&nbsp;<code>Mixed value</code>, <code>String defaultValue</code>&nbsp;) : String            <div class="mdesc">
                        <div class="short">Checks a reference and converts it to the default value if it's empty</div>
            <div class="long">
                Checks a reference and converts it to the default value if it's empty    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>value</code> : Mixed<div class="sub-desc">Reference to check</div></li><li><code>defaultValue</code> : String<div class="sub-desc">The value to insert of it's undefined (defaults to "")</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>String</code></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">Format</td>
    </tr>
        <tr class="method-row expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.util.Format-ellipsis"></a>
            <b>ellipsis</b>(&nbsp;<code>String value</code>, <code>Number length</code>&nbsp;) : String            <div class="mdesc">
                        <div class="short">Truncate a string and add an ellipsis ('...') to the end if it exceeds the specified length</div>
            <div class="long">
                Truncate a string and add an ellipsis ('...') to the end if it exceeds the specified length    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>value</code> : String<div class="sub-desc">The string to truncate</div></li><li><code>length</code> : Number<div class="sub-desc">The maximum length to allow before truncating</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>String</code><div class="sub-desc">The converted text</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">Format</td>
    </tr>
        <tr class="method-row alt expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.util.Format-fileSize"></a>
            <b>fileSize</b>(&nbsp;<code>Number/String size</code>&nbsp;) : String            <div class="mdesc">
                        <div class="short">Simple format for a file size (xxx bytes, xxx KB, xxx MB)</div>
            <div class="long">
                Simple format for a file size (xxx bytes, xxx KB, xxx MB)    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>size</code> : Number/String<div class="sub-desc">The numeric value to format</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>String</code><div class="sub-desc">The formatted file size</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">Format</td>
    </tr>
        <tr class="method-row expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.util.Format-htmlDecode"></a>
            <b>htmlDecode</b>(&nbsp;<code>String value</code>&nbsp;) : String            <div class="mdesc">
                        <div class="short">Convert certain characters (&, <, >, and ') from their HTML character equivalents.</div>
            <div class="long">
                Convert certain characters (&, <, >, and ') from their HTML character equivalents.    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>value</code> : String<div class="sub-desc">The string to decode</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>String</code><div class="sub-desc">The decoded text</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">Format</td>
    </tr>
        <tr class="method-row alt expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.util.Format-htmlEncode"></a>
            <b>htmlEncode</b>(&nbsp;<code>String value</code>&nbsp;) : String            <div class="mdesc">
                        <div class="short">Convert certain characters (&, <, >, and ') to their HTML character equivalents for literal display in web pages.</div>
            <div class="long">
                Convert certain characters (&, <, >, and ') to their HTML character equivalents for literal display in web pages.    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>value</code> : String<div class="sub-desc">The string to encode</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>String</code><div class="sub-desc">The encoded text</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">Format</td>
    </tr>
        <tr class="method-row expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.util.Format-lowercase"></a>
            <b>lowercase</b>(&nbsp;<code>String value</code>&nbsp;) : String            <div class="mdesc">
                        <div class="short">Converts a string to all lower case letters</div>
            <div class="long">
                Converts a string to all lower case letters    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>value</code> : String<div class="sub-desc">The text to convert</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>String</code><div class="sub-desc">The converted text</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">Format</td>
    </tr>
        <tr class="method-row alt expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.util.Format-stripScripts"></a>
            <b>stripScripts</b>(&nbsp;<code>Mixed value</code>&nbsp;) : String            <div class="mdesc">
                        <div class="short">Strips all script tags</div>
            <div class="long">
                Strips all script tags    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>value</code> : Mixed<div class="sub-desc">The text from which to strip script tags</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>String</code><div class="sub-desc">The stripped text</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">Format</td>
    </tr>
        <tr class="method-row expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.util.Format-stripTags"></a>
            <b>stripTags</b>(&nbsp;<code>Mixed value</code>&nbsp;) : String            <div class="mdesc">
                        <div class="short">Strips all HTML tags</div>
            <div class="long">
                Strips all HTML tags    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>value</code> : Mixed<div class="sub-desc">The text from which to strip tags</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>String</code><div class="sub-desc">The stripped text</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">Format</td>
    </tr>
        <tr class="method-row alt expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.util.Format-substr"></a>
            <b>substr</b>(&nbsp;<code>String value</code>, <code>Number start</code>, <code>Number length</code>&nbsp;) : String            <div class="mdesc">
                        <div class="short">Returns a substring from within an original string</div>
            <div class="long">
                Returns a substring from within an original string    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>value</code> : String<div class="sub-desc">The original text</div></li><li><code>start</code> : Number<div class="sub-desc">The start index of the substring</div></li><li><code>length</code> : Number<div class="sub-desc">The length of the substring</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>String</code><div class="sub-desc">The substring</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">Format</td>
    </tr>
        <tr class="method-row expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.util.Format-trim"></a>
            <b>trim</b>(&nbsp;<code>String value</code>&nbsp;) : String            <div class="mdesc">
                        <div class="short">Trims any whitespace from either side of a string</div>
            <div class="long">
                Trims any whitespace from either side of a string    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>value</code> : String<div class="sub-desc">The text to trim</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>String</code><div class="sub-desc">The trimmed text</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">Format</td>
    </tr>
        <tr class="method-row alt expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.util.Format-undef"></a>
            <b>undef</b>(&nbsp;<code>Mixed value</code>&nbsp;) : Mixed            <div class="mdesc">
                        <div class="short">Checks a reference and converts it to empty string if it is undefined</div>
            <div class="long">
                Checks a reference and converts it to empty string if it is undefined    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>value</code> : Mixed<div class="sub-desc">Reference to check</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>Mixed</code><div class="sub-desc">Empty string if converted, otherwise the original value</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">Format</td>
    </tr>
        <tr class="method-row expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.util.Format-uppercase"></a>
            <b>uppercase</b>(&nbsp;<code>String value</code>&nbsp;) : String            <div class="mdesc">
                        <div class="short">Converts a string to all upper case letters</div>
            <div class="long">
                Converts a string to all upper case letters    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>value</code> : String<div class="sub-desc">The text to convert</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>String</code><div class="sub-desc">The converted text</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">Format</td>
    </tr>
        <tr class="method-row alt expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.util.Format-usMoney"></a>
            <b>usMoney</b>(&nbsp;<code>Number/String value</code>&nbsp;) : String            <div class="mdesc">
                        <div class="short">Format a number as US currency</div>
            <div class="long">
                Format a number as US currency    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>value</code> : Number/String<div class="sub-desc">The numeric value to format</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>String</code><div class="sub-desc">The formatted currency string</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">Format</td>
    </tr>
            </table>
                <a id="Ext.util.Format-events"></a>
        <h2>Public Events</h2>
        <div class="no-members">This class has no public events.</div>
        </div>